package com.orientation.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 文章
 * </p>
 *
 * @author xuandian
 * @since 2022-3-9
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_article")
@ApiModel(value = "Article对象", description = "文章")
public class Article implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "SID", type = IdType.ASSIGN_UUID)
    private String sid;

    @ApiModelProperty(value = "标题")
    @TableField("TITLE")
    private String title;

    @ApiModelProperty(value = "内容")
    @TableField(value = "CONTENT")
    private String content;

    @ApiModelProperty(value = "作者")
    @TableField("AUTHOR")
    private String author;

    @ApiModelProperty(value = "分类ID")
    @TableField("CID")
    private String cid;

    @ApiModelProperty(value = "发布1未发布0")
    @TableField("RELEASE_TYPE")
    private String releaseType;

    @ApiModelProperty(value = "预览次数")
    @TableField("HITS")
    private Integer hits;

    @ApiModelProperty(value = "发布时间")
    @TableField(value = "NEWS_TIME", fill = FieldFill.UPDATE)
    private LocalDateTime newsTime;

    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private String createUser;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人")
    @TableField(value = "UPDATE_USER", fill = FieldFill.UPDATE)
    private String updateUser;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "逻辑删除")
    @TableField("DELETED")
    private Integer deleted;

    @ApiModelProperty(value = "乐观锁注解字段")
    @TableField(value = "VERSION")
    @Version
    private Integer version;

    @ApiModelProperty(value = "处理异常字段")

    @TableField(exist = false)
    private String name;
}
